#include<iostream>

using namespace std;

int main(int argc, char const *argv[])
{
    string str;
    int count = 0;
    getline(cin,str);
    for (int i = 0; i < str.size(); i++)
    {
        if(str[i]==' ') count++;
        else if(str[i]>='w')count += str[i]-'w'+1;
        else if (str[i]>='t')count += str[i]-'t'+1;
        else if (str[i]>='p')count += str[i]-'p'+1;
        else if (str[i]>='m')count += str[i]-'m'+1;
        else if (str[i]>='j')count += str[i]-'j'+1;
        else if (str[i]>='g')count += str[i]-'g'+1;
        else if (str[i]>='d')count += str[i]-'d'+1;
        else if (str[i]>='a')count += str[i]-'a'+1;
    }
    cout<<count;
    return 0;
}
